package com.start.common.mybaitsplus;

import com.baomidou.mybatisplus.core.toolkit.LambdaUtils;
import com.start.common.entity.StartBaseEntity;
import com.start.common.tools.StartFunction;

public class StartMBColumnTools {
    public static <T, R> String getColumn(StartFunction<T, R> func) {
        String fieldName = func.getFieldName();
        Class<? extends StartFunction> aClass = func.getClass();
        return com.baomidou.mybatisplus.core.toolkit.StringUtils.camelToUnderline(fieldName);
    }

    public static void main(String[] args) {
        String column = StartMBColumnTools.getColumn(StartBaseEntity::getId);
        System.out.printf("column",column);
    }
}
